#ifndef ITEM_H
#define ITEM_H

#include <iostream>
#include <iomanip>

template <typename T>
class Item{
private:
	int key;
	T elem;
public:
	int *pos;

	Item(const int k=0, const T& e = T(), int* p=0)
		: key(k), elem(e), pos(p) {}
	//~Item(){ delete pos; }
	const int get_key() const { return key; }
	const T& get_elem() const { return elem; }
	void set_key(const int k) { key = k; }
	void set_elem(const T& e) { elem = e; }
	
	bool operator<(const Item& i);
	bool operator>(const Item& i);
	bool operator==(const Item& i);
};

template <typename T>
bool Item<T>::operator<(const Item& i){ return elem < i.elem; }

template <typename T>
bool Item<T>::operator>(const Item& i){ return elem > i.elem; }

template <typename T>
bool Item<T>::operator==(const Item& i){ return elem == i.elem; }

#endif
